import java.io.*;

public class Buffer {
    public static void main(String[] args) throws IOException {
        String filePath="C:\\Users\\22453\\Desktop\\test.txt";
        File f=new File(filePath);
        BufferedInputStream stream=new BufferedInputStream(new FileInputStream(filePath));//装饰器
        BufferedOutputStream stream1=new BufferedOutputStream(new FileOutputStream(f));
        byte[]bytes=new byte[20];
        String out="bbbbb";
        stream1.write(Integer.parseInt(out));
        stream.read(bytes);//读文件
        String content =new String(bytes);//转换
        System.out.println(content);
        stream.close();//关闭
    }

}
